<?php
/**
 * 友情链接
 */

class Links extends CWidget {
    public function run() {
        $criteria = new CDbCriteria();
        $criteria->condition = 'type = ' . Link::TYPE_TEXT;
        $criteria->select = array('name', 'url', 'logo_filename');
        $criteria->order = 'order_pos ASC';
        $text_links = Link::model()->findAll($criteria);
        
        $this->render('Links', array(
            'text_links' => $text_links
        ));
    }
}
